<!DOCTYPE HTML>
<html lang="zh-CN" >
<head>
<meta charset="utf-8"/>
<title>修改</title>
<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/css/styles.css" rel="stylesheet">
<script src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
</head>
<body>	
<h4>&nbsp;&nbsp;&nbsp;&nbsp;修改资料</h4>
							<form role="form" id="modify">	
								<div class="form-group">
								       <input type="hidden" name='id' value='<{$dat.id}>'>
											<label>&nbsp;&nbsp;&nbsp;&nbsp;用户名:</label><input name='username' class="form-control" value="<{$dat.username}>">
										  <label>&nbsp;&nbsp;&nbsp;&nbsp;新密码:</label><input name='password' class="form-control" placeholder="请输入新密码！">
										  <div class="radio">&nbsp;&nbsp;&nbsp;&nbsp;
										<label>
											<input type="radio" name="type"  value="1">管理员
										</label>
										<label>
											<input type="radio" name="type"  value="2">普通用户
										</label>
										
									</div>
										  <br>
								  <div align="center"><button onclick="che()" class="btn btn-default" 
                data-dismiss="modal">关闭
            </button>&nbsp;&nbsp;<button onclick="sub()" class="btn btn-primary">保存</button></div>					
							</div>
						</form>
	<script>
	function sub(){
	$.ajax({
				cache: true,
				type: "POST",
				url:"__URL__/modify",
				data:$('#modify').serialize(),// 你的formid
				async: false,
			  error: function(request) {
			        alert("Connection error !");
			    },
			    success: function(msg) {
				   alert("提示信息:  "+msg);
			    }
			});
	
	}
	function che(){
 window.location.href=window.location.href;
	}

	</script>
</body>
</html>
